﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <script src="~/Content/js/jquery-1.8.2.js"></script>
</head>
<body>
    <div>
        <input type="button" id="btn_1" onclick="SetCookie()" value="设置Cookie" />
        <input type="button" id="btn_2" onclick="GetCookie()" value="获取Cookie" />
    </div>
    <script type="text/javascript">
        function SetCookie() {
            $.ajax({
                url: "/Cookie/WriteCookie",
                type: "POST"
            });
        }
        function GetCookie() {
            $.ajax({
                url: "/Cookie/GetCookie",
                type: "POST",
                success: function (result) {
                    alert(result);
                }
            });
        }
    </script>
</body>
</html>
